﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using BitPortal.Business;
using BitPortal.Models;
namespace BitPortal.Admin.Config.UserConfig.Module
{
    public partial class PortalConfigGroup : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
                BindData();
        }

        public void BindData()
        {
            ExtendedBitPortalEntities bitEnt = new ExtendedBitPortalEntities();
            var list = (from ent in bitEnt.PortalConfigs
                        where !string.IsNullOrEmpty(ent.Group)
                        orderby ent.Group ascending
                        select new { Group = ent.Group }).Distinct();
            Store1.DataSource = list;
            Store1.DataBind();
        }

        public Ext.Net.ComboBox ComboboxGroup
        {
            get { return this.ComboBox1; }
        }
    }
}